package com.jy.control.vehicle;

import com.jy.model.M_Vehicle;
import com.jy.model.vehicle.M_Brand;
import com.jy.service.vehicle.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BrandControl {

    private BrandService service;

    @Autowired
    public BrandControl(BrandService service){
        this.service = service;
    }

    @RequestMapping("/vehicle/brandList")
    public List<M_Brand> List(){
        List<M_Brand> mBrandList = service.queryAllBrand();
        return mBrandList;
    }
}
